package com.xbenmh.order.fillbean;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @Author: xben
 * @Date: 2018/11/29 17:32
 */
public class CDPlayer implements MediaPlayer{
    private CompactDisc cd;
    @Autowired
    MediaPlayer mediaPlayer;
//    @Bean
//    public CompactDisc sgtpeppers(){
//        return new SgtPeppers();
//    }
//    @Bean
//    public CDPlayer cdPlayer(){
//        return new CDPlayer(sgtpeppers());
//    }
    @Autowired
    public void setCompactDisc(CompactDisc compactDisc){
        this.cd = compactDisc;
    }


    @Override
    public void play() {
        System.out.println(123);
    }
}
